package lab02.test09;

public class Student {

    //属性
    String sno;
    String classes;
    String name;
    String sex;
    int age;

    //构造函数

    public Student(String sno,String classes,String name,String sex,int age){
        this.sno=sno;
        this.classes=classes;
        this.name=name;
        this.sex=sex;
        this.age=age;

    }

    public String getSno() {
        return sno;
    }

    public void setClasses(String classes) {
        this.classes = classes;
    }

    public String getName() {
        return name;
    }

    public String getSex() {
        return sex;
    }

    public int getAge() {
        return age;
    }

    //使用字符窜输出

    @Override
    public String toString() {
        return "学号:"+sno+" 班号："+classes+" 姓名："+name+" 性别："+sex+" 年龄："+age;
    }
}
